/**
 * Created with IntelliJ IDEA.
 * Description: Java 程序设计第三周作业
 */
public class Test {
    public  static  void  main(String args[ ]) {
        int  i , s = 0 ;
        int a[] = { 10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 , 90 };
        for ( i = 0 ; i < a.length ; i ++ )
            if ( i%4 == 0 ) s += a[i] ;
        System.out.println("s="+s);
    }

    public static void main4(String  args[ ]) {
        for( int i=0; i<3; i++){
            for( int j=0; j<3; j++) {
                if(j >= 1) break;
                System.out.println( i+" and "+j );
            }
        }
    }

    public static void main3(String[ ] args) {
        for(int x = 0 ; x < 5 ;x++) {
            if(x%2==0)
                continue;
            System.out.println(x);
        }
    }

    public static void main2(String[ ] args) {
        int sum = 0;
        for(int x  = 1 ; x <= 10 ; x+=3) {
            sum = sum + x;
        }
        System.out.println("sum=" +sum);
    }

    public static void main1(String[ ] args) {
        int x = 1,count=0;
        while(x<=10) {
            if(x%2==1) {
                count++;
            }
            x++;
        }
        System.out.println("count="+count);
    }

}
